package com.lazyboyl.spring.boot.sharding.sphere.proxy.net.handler.factory;

import com.lazyboyl.spring.boot.sharding.sphere.proxy.net.handler.backend.BackendConnection;
import com.lazyboyl.spring.boot.sharding.sphere.proxy.net.handler.backend.pool.MySqlDataPool;

/**
 * @author linzf
 * @since 2021-07-02
 * 类描述： 后端连接的工厂类
 */
public class BackendConnectionFactory {

    private MySqlDataPool mySqlDataPool;

    public BackendConnectionFactory(MySqlDataPool mySqlDataPool) {
        this.mySqlDataPool = mySqlDataPool;
    }

    public BackendConnection getConnection() {
        BackendConnection connection = new BackendConnection(mySqlDataPool);
        return connection;
    }

}
